ITEM "Select Concept" SET my_objid: (STR objid) SET myobjid: (VAL my_objid) CC "Modeling" GET_ACT_MODEL #--> RESULT modelid: intValue SET myModelID: (modelid) #FIRST SET CC "Core" GET_CLASS_ID objid: (myobjid) #--> RESULT ecode: intValue classid: intValue isrel: intValue CC "Core" GET_ATTR_ID classid: (classid) attrname: ("Semantic Transit Model") #--> RESULT ecode: intValue attrid: id CC "Core" GET_INTERREF objid: (myobjid) attrid: (attrid) index: 0 # --> RESULT ecode: intValue tmodeltype: strValue tmodelname: strValue tmodelver: strValue ( type:"modelreference" | ( type:"objectreference" tclassname: strValue tobjname: strValue ) ) . #SECOND SET CC "Core" GET_CLASS_ID objid: (tobjid) #--> RESULT ecode: intValue classid: intValue isrel: intValue CC "Core" GET_ATTR_ID classid: (classid) attrname: ("Concept type") #--> RESULT ecode: intValue attrid: id CC "Core" GET_INTERREF objid: (tobjid) attrid: (attrid) index: 0 # --> RESULT ecode: intValue tmodeltype: strValue tmodelname: strValue tmodelver: strValue ( type:"modelreference" | ( type:"objectreference" tclassname: strValue tobjname: strValue ) ) . #CC "Core" GET_ALL_OBJS modelid:(tmodelid) #CC "Core" GET_ALL_ATTRS classid:(tclassid) SET aql_str:(("{\"")+(tobjname)+("\":\"")+(tclassname)+("\":\"")+(tmodelname)+("\":\"")+(tmodeltype)+("\"}<-\"belongs to\"")) CC "AQL" EVAL_AQL_EXPRESSION expr: (aql_str) modelid: (tmodelid) #--> RESULT ecode: intValue objids: strValue SET conceptIDs:(objids) # create the main TreeListBox with all its parameters CC "AdoScript" TLB_CREATE title:"Select Detailed Annotation" oktext:"OK" canceltext:"Cancel" boxtext:"Please choose one of the following related concepts" no-help:1 button-w:60 max-w:500 max-h:367 min-w:200 min-h:150 sorted: 1 checklistbox:1 FOR conceptID in:(conceptIDs) { CC "Core" GET_OBJ_NAME objid: (VAL conceptID) #--> RESULT ecode: intValue objname: strValue SET conceptName: (objname) # insert some entries (as you like - ID should be unique) CC "AdoScript" TLB_INSERT id:(VAL conceptID) text:(conceptName) } # and finally show it CC "AdoScript" TLB_SHOW IF (ecode = 0) { #CC "AdoScript" INFOBOX ("Selected concepts: " + selectedids + "\n" + "You pushed the following button: " + endbutton) CC "Core" GET_CLASS_ID classname: ("Customization feature") #--> RESULT ecode: intValue classid: intValue SET myclassid: (classid) CC "Core" GET_ATTR_ID classid: (myclassid) attrname: "Detailed Annotation" #--> RESULT ecode: intValue attrid: id SET myattrid: (attrid) #first delete the existing INTERREF, if any CC "Core" GET_INTERREF_COUNT objid: (myobjid) attrid: (myattrid) #--> RESULT ecode: intValue count: intValue . IF ((count)>0) { CC "Core" REMOVE_INTERREF objid: (myobjid) attrid: (myattrid) index: 0 #--> RESULT ecode: intValue } FOR mySelectedID in: (selectedids) { CC "Core" ADD_INTERREF objid: (myobjid) attrid: (myattrid) tobjid: (VAL mySelectedID) #--> RESULT ecode: intValue #Adds only the first selected Secondary Diagnosis EXIT } } ELSE { CC "AdoScript" INFOBOX ("You cancelled the dialog without selecting detailed annotation!") }